//
// Created by whitby on 8/22/23.
//

#ifndef MONO_ORB_SLAM2_DATA_H
#define MONO_ORB_SLAM2_DATA_H

#include <fstream>
#include <sstream>
#include <vector>

void loadCameraData(const std::string &path, std::vector<double> &timestamps) {
    std::ifstream fin(path);
    while (!fin.eof()) {
        std::string lineStr;
        getline(fin, lineStr);
        if (!lineStr.empty()) {
            std::stringstream ss(lineStr);
            double t;
            ss >> t;
            timestamps.push_back(t);
        }
    }
    fin.close();
}

#endif //MONO_ORB_SLAM2_DATA_H
